﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Bzure.Apps.Security.ViewModels
{
    public class RegisterModel
    {
        [Required]
        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "邮箱")]
        public string Email { get; set; }

        [Required]
        //[ValidatePasswordLength]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "确认密码")]
        [Compare("Password", ErrorMessage = "密码没有确认一致")]
        public string ConfirmPassword { get; set; }
    }
    public class RegisterViewModel : IPageViewModel
    {
        public RegisterViewModel()
        {
            this.Title = string.Empty;
            this.Message = string.Empty;
            this.RegisterModel = new RegisterModel();
        }
        public string Title { get; set; }
        public string Message { get; set; }
        public RegisterModel RegisterModel { get; set; }
        public MasterViewModel MasterViewModel { get; set; }
    }
}
